package com.citi.xylophone.phoneEmulator.factory;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

import com.citi.xylophone.phoneEmulator.model.xml.Config;
import com.thoughtworks.xstream.XStream;

public class FactoryInitConfig {
	
	public static Config getConfig(String fileNameConfig) throws FileNotFoundException{
	
		FileInputStream xml = new FileInputStream(fileNameConfig);
		XStream xstream = new XStream();
		xstream.processAnnotations(Config.class);
		Config config = (Config)xstream.fromXML(xml);
		return config;
	}

}
